import java.util.ArrayList;
import java.awt.*;
import javax.swing.*;
import java.net.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.io.IOException;


public class readFile 
	{
		private URL url;
		
		public readFile()
		{
		}
		
		//prints contents of file
		public String read(URL url)
		{
			this.url = url;
			String temp = "";
			try{
				URLConnection conn = url.openConnection();
				BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
				String HTML = "poop";
				while((HTML = rd.readLine()) != null)
					{
							temp += HTML;
							temp += "\n";
					}
				}
			
			catch ( Exception e )
			{
				e.printStackTrace();
				
			}
			return temp;
			
		}

	}